//读者管理部分的接口函数
import service from "@/utils/http";

//获取读者列表接口函数
export const getReaderListAPI = (params)=>{
  return service({
    url:'/api/reader/list',
    params   //是一个对象
  })
}

//添加读者接口函数
export const addReaderAPI = (data)=>{
  return service({
    url:'/api/reader/add',
    method:'POST',
    data
  })
}

//修改读者接口函数
export const updateReaderAPI = (data)=>{
  return service({
    url:'/api/reader/put',
    method:'PUT',
    data
  })
}

//删除读者接口函数
export const deleteReaderAPI = (id)=>{
  return service({
    url:'/api/reader/del',
    method:'DELETE',
    params:{
      id:id
    }
  })
}